package com.itHsuSE.demo2;

public class VarParameterExer {
    public static void main(String[] args) {
        Method01 method01=new Method01();
        System.out.println(method01.score("joe",100,100,100,100,100));
    }
}

class Method01{
    public String score(String name,double...nums){
        int scores=0;
        for (int i = 0; i < nums.length; i++) {
            scores+=nums[i];
        }
        return name+"有"+nums.length+"门课的成绩总分是："+scores;
    }
}